﻿#pragma once

#include "object.h"
#include "D3DXDefines.h"

class CGame;

struct TriangleVertexData
{
	float x, y, z;
	DWORD color;
	float tu, tv;
};

class CTriangle :
	public Object, public RenderListener
{
public:
	CTriangle(CGame* game);
	virtual ~CTriangle(void);

	//object virtual funtion
	virtual bool Tick();
	virtual bool PrepareRender();

	//RenderListener virtual funtion
	virtual void VisitRender(RenderDataList& renderList);

private:
	typedef VertexDataCreator<TriangleVertexData> VData;
	typedef std::vector< VData > VertexDataCreatorList;
	VertexDataCreatorList mVertexDataCreatorList;
};
